package com.celan.year2022.day1218;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            int minLength = in.nextInt();
            double[] nums = new double[n];
            for (int i = 0; i < n; i++) {
                nums[i] = in.nextDouble();
            }
            int start_res = n;
            int length_res = 0;
            double max = 0;
            //i==数组长度
            for (int i = minLength - 1; i < n; i++) {
                int start = 0, end = i;
                while (end < n) {
                    double calculate = calculate(nums, start, end);
                    if (calculate - max > Math.pow(10,-10)) {
                        max = calculate;
                        start_res = start;
                        length_res = end - start + 1;
                    } else if (calculate == max) {
                        if ((end - start + 1) < length_res) {
                            start_res = start;
                            length_res = end - start + 1;
                        } else if (end - start + 1 == length_res) {
                            if (start < start_res) {
                                start_res = start;
                                length_res = end - start + 1;
                            }
                        }
                    }
                    start++;
                    end++;
                }
            }
            System.out.println(start_res + " " + length_res);
        }
    }

    static double calculate(double[] nums, int start, int end) {
        double sum = 1.0;
        double k = end - start + 1;
        for (int i = start; i <= end; i++) {
            sum *= nums[i];
        }
        return Math.pow(sum, 1.0 / k);
    }
}
